//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//********************************************************* 

using System.Collections.Generic;
using System;

namespace Microsoft.TridentWordAddIn.Common
{
    public class JobOutputCollection : List<JobOutput>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="JobOutputCollection"/> class.
        /// </summary>
        public JobOutputCollection()
        {   
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="JobOutputCollection"/> class.
        /// </summary>
        /// <param name="jobOutputs">The job outputs.</param>
        public JobOutputCollection(List<JobOutput> jobOutputs)
        {
            this.Clear();
            this.AddRange(jobOutputs);
        }
    }

    public class JobOutput : BaseFile
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="JobOutput"/> class.
        /// </summary>
        public JobOutput()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="JobOutput"/> class.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="contents">The contents.</param>
        /// <param name="isDataProduct">if set to <c>true</c> [is data product].</param>
        public JobOutput(Guid id, string fileName, byte[] contents, bool isDataProduct)
        {
            this.Id = id;
            this.FileName = fileName;
            this.Contents = contents;
            this.IsDataProduct = isDataProduct;
        }

        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>The ID.</value>
        public Guid Id { get; set; }

        /// <summary>
        /// Gets or sets the contents.
        /// </summary>
        /// <value>The contents.</value>
        public byte[] Contents { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is final.
        /// </summary>
        /// <value><c>true</c> if this instance is final; otherwise, <c>false</c>.</value>
        public bool IsDataProduct { get; set; }
    }
}
